package com.wangyk.user.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 验证gateway的权限
 */
@Controller
@RequestMapping("/auth")
public class AuthController
{
    /**
     * 只有买家才可以访问
     */
    @ResponseBody
    @RequestMapping("/buyer")
    public String buyer()
    {
        return "buyer";
    }

    /**
     * 只有卖家才可以访问
     */
    @ResponseBody
    @RequestMapping("/seller")
    public String seller()
    {
        return "seller";
    }

    /**
     * 买家和卖家都可以访问
     */
    @ResponseBody
    @RequestMapping("/all")
    public String all()
    {
        return "all";
    }
}
